package com.xy.curtain;

import com.xy.command.Command;

/**
 * @author 谢阳
 * @version 1.8.0_131
 * @date 2022/6/16 21:06
 * @description
 */
public class CurtainOnCommand implements Command {
    private CurtainReceiver curtain;

    public CurtainOnCommand(CurtainReceiver curtainReceiver) {
        this.curtain = curtainReceiver;
    }

    @Override
    public void execute() {
        curtain.on();
    }

    @Override
    public void undo() {
        curtain.off();
    }
}
